package fatworm.storage.table;

import fatworm.storage.buffer.*;
import fatworm.storage.file.*;

public class TuplePageFormatter implements PageFormatter
{
    private TableInfo ti;

    public TuplePageFormatter(TableInfo ti)
    {
        this.ti = ti;
    }
    public void format(Page page)
    {
        page.setBytes(0, new byte[Page.BLOCK_SIZE]);
        /*int recsize = ti.tupleLength() + 1;
        for (int pos = 0; pos + recsize <= Page.BLOCK_SIZE; pos += recsize)
        {
            page.setBytes(pos, new byte[]{TuplePage.EMPTY});
            for (String fldname : ti.schema().fields())
            {
                int offset = ti.offset(fldname);
                page.setBytes(offset, ti.schema().type(fldname).toBytesInTuplePage());
            }
        }*/
    }
}
